<%@page import="enterprise.web_jpa_war.entity.Customer"%>
<%@page import="enterprise.web_jpa_war.entity.Cusorder"%>
<%@page import="java.util.Vector"%>

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <%@include file="includes/header2.jsp" %>



        <div id="mainbody_right">
            <% Customer cus=(Customer)request.getAttribute("customer"); %>

            <h1>List of Orders for Customer <%=cus.getGivenname() %> </h1>
            <p>Given name : <%=cus.getGivenname() %>  </p>
            <p>Surname    : <%=cus.getSurname() %></p>

            <table>
              <tr>
                <th>Order ID</th>
                <th >Ordered Item</th>
                <th >Date Of Order</th>
                <th >Due Date</th>
              </tr>
            <% Vector lists=(Vector)request.getAttribute("selOrderList");
                for(int x=0;x<lists.size();x++){
                Cusorder ord=(Cusorder)lists.get(x);  %>
                <tr>
                    <td>  <%= ord.getOrd_id() %> </td>
                    <td>  <%= ord.getOrdereditem() %></td>
                    <td>  <%= ord.getDateoforder() %> </td>
                    <td>  <%= ord.getDuedate() %> </td>
                </tr>
            <% } %>
            
            </table>


                 <div class="cleaner">&nbsp;</div>
        </div>

    <%@include file="includes/footer.jsp" %>

</html>